package org.nmgyjt.springboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;


@EnableScheduling
@MapperScan("org.nmgyjt.springboot.mapper")    //Mybatis mapper接口路径
@ComponentScan(basePackages = {"org.nmgyjt.springboot.*"})   //由于MainApplication没有在项目根目录， 需要配置basePackages属性使得成功扫描所有Spring组件；
@Configuration
@EnableAsync
@SpringBootApplication(exclude = {
        DataSourceTransactionManagerAutoConfiguration.class,
        HibernateJpaAutoConfiguration.class})
public class NMGYJTEmergencyManagerRun {
    public static void main(String[] args) {
        SpringApplication.run(NMGYJTEmergencyManagerRun.class,args);
    }
}
